package com.fsharemobile.fragments;



import java.util.ArrayList;
import java.util.List;

import com.fsharemobile.R;
import com.fsharemobile.adapter.PictureGridViewAdapter;

import android.os.Bundle;


import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import android.widget.GridView;
import android.widget.LinearLayout;


public class PicturesFragment extends Fragment {
	
	Integer []myArr;
	GridView gvPicture;
	List<String> arrLink = new ArrayList<String>();

	
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onActivityCreated(savedInstanceState);
		
		myArr= new Integer[]{
				R.drawable.ic_camera,
				R.drawable.ic_upload,
				R.drawable.ic_home_select,
				R.drawable.ic_tool_select,
				R.drawable.ic_view_select
			};
		//arrLink.add("http://42.116.28.51/img/QKrD094CvaigaNwg6znecOfUV7EgJKv1A+7wE-mdReGf/4199d0a4_5.jpg_1_s.jpg");
		//arrLink.add("http://42.116.28.51/img/QKrD094CvaigaNwg6znecOfUV7EgJKv1A+7wE-mdReGf/4d41dfbf_3942026-vector-illustration-card-for-christmas-and-cool-background.jpg_2_s.jpg");
		//arrLink.add("http://42.116.28.51/img/QKrD094CvaigaNwg6znecOfUV7EgJKv1A+7wE-mdReGf/2f193bdc_freegreatpicture.com-11919-high-resolution-color-background.jpg_3_s.jpg");
		//arrLink.add("http://42.116.28.51/img/QKrD094CvaigaNwg6znecOfUV7EgJKv1A+7wE-mdReGf/9570227e_20130818_104202.jpg_5_s.jpg");
		arrLink.add("http://i.imgur.com/CqmBjo5.jpg");
		arrLink.add("http://i.imgur.com/zkaAooq.jpg");
		gvPicture= (GridView) getActivity().findViewById(R.id.gv_pictures);	
		gvPicture.setAdapter(new PictureGridViewAdapter(getActivity(),arrLink));
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		View view=  (LinearLayout) inflater.inflate(R.layout.fragment_pictures, container, false);
		return view;
	}	
}
